package TreeFormula;


import java.util.Scanner;

/**
 *
 * Exercise 9 (Part 2)
 * @author Katrin Baryshnikova
 */
public class TreeFormula {

    /**
     * 
     * @param args
     */
    public static void main(String[] args) {
        
        Scanner in = new Scanner(System.in);
        String formula = in.nextLine();
        int n = formula.length();
        
        BinaryTree tr = new BinaryTree(PostfixNotation.convertInToPrefix(formula));

        System.out.println("Postfix : ");
        tr.showPostfix();
        System.out.println("Prefix : ");
        tr.showPrefix();
        System.out.println("Infix : ");
        tr.showInFix();
    }

    
}
